package main.entity;

import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.Past;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.stereotype.Component;

@Component
//@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Entity(name="user")
public class UserVO extends BaseVO {

	/**
	 * 2016-10-24-pm
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "userID", unique = true, nullable = true)
	private Integer userID;
	@NotEmpty
	@Column(name="username", unique=true, nullable = true, length=255)
	private String username;
	@NotEmpty
	@Column(name="password", nullable = true, length=255)
	private String password;
	@NotEmpty
	@Column(name="userType", nullable=true)
	private String userType;//employee, manager, boss
	@NotEmpty
	@Column(name="status", nullable = true, length=16)
	private String status;//off-line,online
//	@Transient
	@Column(nullable = true, length=16)
	private String gender;
//	@Transient
	@Past
//	@Column(nullable = true, length=16)
	private Date bornDate;
//	@Transient
	@Column(name="headImg")
	private String hdImgPath;
	
	public Integer getUserID() {
		return userID;
	}
	public void setUserID(Integer userID) {
		this.userID = userID;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getUserType() {
		return userType;
	}
	public void setUserType(String userType) {
		this.userType = userType;
	}
	public String getStatus() {
		return status;
	}
	public void setStauts(String status) {
		this.status = status;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public Date getBornDate() {
		return bornDate;
	}
	public void setBornDate(Date bornDate) {
		this.bornDate = bornDate;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getHdImgPath() {
		return hdImgPath;
	}
	public void setHdImgPath(String hdImgPath) {
		this.hdImgPath = hdImgPath;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
}
